package org.cying.main.feign;

import org.cying.main.domain.SampleResult;
import org.cying.main.domain.Student;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value = "Student-Server")
public interface TaskFeignStudent {

    @GetMapping(value = "/stu/get/by-sid")
    SampleResult<List<Student>> getBySid(
            @RequestParam(value = "sid", required = false) String sid,
            @RequestParam(value = "sname", required = false) String name
    );

    @GetMapping(value = "/stu/get/by-dept")
    SampleResult<List> getByDept(
            @RequestParam(value = "dept", required = true) String dept,
            @RequestParam(value = "group", required = false) String group
    );

}
